package com.sgb.goods.entity;

import java.util.List;

/**
 * 商品订单--收货详情
 * @author cyj
 */
public class ReceiptGoodsDelEntity {

    public long id;
    public String name;
    public String phone;
    public String carNumber;
    public String orderId;
    public String money;
    /** 收货金额 */
    public String amountReceived;
    public List<DeliverDetailVODTO> deliverDetailVO;
    public List<ListDTO> list;
    public String remarks;
    public String file;
    public String receivingTime;
    public Long receivingTimestamp;
    public String sendFile;
    public boolean settlement;
    public int state;
    public String remark;
    public String receiveRemark;
    public String created;
    public Long createdTimestamp;
    public String creator;

    public static class DeliverDetailVODTO {
        public String cid;
        public String cidName;
        public String deliverID;
        public List<ListDTO> list;

        public static class ListDTO {
            public String id;
            public String orderId;
            public String commodityId;
            public String skuId;
            public String name;
            public String brand;
            public String money;
            public String count;
            public String tax;
            public String total;
            public String shipmentQuantity;
            public String deliverId;
            public String quantityReceived;

            public List<SkuDetailsDTO> skuDetails;
            public String unit;
            public List<String> images;
            public String created;
            public String creator;

            /**
             * 获取sku拼接字符串
             */
            public String getSkuString() {
                StringBuffer sb = new StringBuffer("");
                if (null != skuDetails) {
                    for (SkuDetailsDTO skuDetailEntity : skuDetails) {
                        sb.append(skuDetailEntity.name).append("：").append(skuDetailEntity.val).append("；");
                    }
                }
                return sb.toString();
            }

            public static class SkuDetailsDTO {
                public String id;
                public String name;
                public String attribute;
                public String val;
            }
        }
    }

    public static class ListDTO {
        public String id;
        public String orderId;
        public String commodityId;
        public String skuId;
        public String name;
        public String brand;
        public String money;
        public String count;
        public String tax;
        public String total;
        public String shipmentQuantity;
        public String deliverId;
        public String quantityReceived;
        public String shipmentQuantityCount;
        public List<SkuDetailsDTO> skuDetails;
        public String unit;
        public List<String> images;
        public String created;
        public String creator;

        /**
         * 获取sku拼接字符串
         *
         * @return
         */
        public String getSkuString() {
            StringBuffer sb = new StringBuffer("");
            if (null != skuDetails) {
                for (SkuDetailsDTO skuDetailEntity : skuDetails) {
                    sb.append(skuDetailEntity.name).append("：").append(skuDetailEntity.val).append("；");
                }
            }
            return sb.toString();
        }

        public static class SkuDetailsDTO {
            public String id;
            public String name;
            public String attribute;
            public String val;
        }
    }
}
